package com.yiweikeji.project.core;

/**
 * 短信模板枚举
 */
public enum SmsTempletType {
	
	RAPID_REGISTRATION("rapidRegistration","快速注册短信验证码"),
	THIRD_PARTY_LOGIN("thirdPartyLogin","第三方登陆短信验证码"),
	VERIFICATION_CODE_LANDING("verificationCodeLanding","验证码登陆"),
	UPDATE_VERIFICATION_CODE("updateVerificationCode","更绑手机验证码"),
	SET_PASSWORD_VERIFICATION_CODE("setPasswordVerificationCode","设置密码验证码"),
	
	;
	
	private String code;
	private String desc;
	
	SmsTempletType(String code, String desc) {
		this.code = code;
		this.desc = desc;
	}
	
	
	/**
	 * 通过状态码获取ENUM的名字
	 * 
	 * @param code
	 * @return
	 */
	public static ResultCode getEnumByStatusCode(String code) {
		for (ResultCode p : ResultCode.values()) {
			if (p.code().equalsIgnoreCase(code)) {
				return p;
			}
		}

		return null;
	}
	
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getDesc() {
		return desc;
	}
	public void setDesc(String desc) {
		this.desc = desc;
	}
	
	
	

}
